package cn.lg.soar.system.biz.config;

import cn.lg.soar.database.datascope.DataScopeHolder;
import cn.lg.soar.system.biz.filetemplate.FileTemplateManager;
import cn.lg.soar.system.biz.handler.AccountBindTypeTranslateHandler;
import cn.lg.soar.system.biz.handler.ClientTypeTranslateHandler;
import cn.lg.soar.system.biz.handler.UserStatusTranslateHandler;
import cn.lg.soar.system.biz.handler.UserTypeTranslateHandler;
import cn.lg.soar.system.biz.modules.account.controller.*;
import cn.lg.soar.system.biz.modules.account.service.impl.*;
import cn.lg.soar.system.biz.modules.auth.client.*;
import cn.lg.soar.system.biz.modules.auth.controller.*;
import cn.lg.soar.system.biz.modules.auth.mapper.*;
import cn.lg.soar.system.biz.modules.auth.service.*;
import cn.lg.soar.system.biz.modules.auth.service.impl.*;
import cn.lg.soar.system.biz.modules.general.client.*;
import cn.lg.soar.system.biz.modules.general.controller.*;
import cn.lg.soar.system.biz.modules.general.mapper.DataSourceMapper;
import cn.lg.soar.system.biz.modules.general.service.FileAccessService;
import cn.lg.soar.system.biz.modules.general.service.FileService;
import cn.lg.soar.system.biz.modules.account.service.UserTagItemService;
import cn.lg.soar.system.biz.modules.general.service.impl.*;
import cn.lg.soar.system.biz.modules.message.controller.NoticeController;
import cn.lg.soar.system.biz.modules.message.controller.SseController;
import cn.lg.soar.system.biz.modules.message.controller.WebSocket;
import cn.lg.soar.system.biz.modules.message.service.impl.NoticeRecipientServiceImpl;
import cn.lg.soar.system.biz.modules.message.service.impl.NoticeServiceImpl;
import cn.lg.soar.system.biz.modules.message.service.impl.SseServiceImpl;
import cn.lg.soar.system.biz.modules.message.service.impl.WebSocketServiceImpl;
import cn.lg.soar.system.biz.modules.monitor.client.LogConfigApiClient;
import cn.lg.soar.system.biz.modules.monitor.client.OperationLogApiClient;
import cn.lg.soar.system.biz.modules.monitor.controller.*;
import cn.lg.soar.system.biz.modules.general.service.impl.LogConfigServiceImpl;
import cn.lg.soar.system.biz.modules.monitor.service.impl.OperationLogServiceImpl;
import cn.lg.soar.system.biz.modules.monitor.service.impl.RefreshTokenServiceImpl;
import cn.lg.soar.system.biz.modules.sso.controller.SsoApplyController;
import cn.lg.soar.system.biz.modules.sso.service.impl.SsoApplyServiceImpl;
import cn.lg.soar.system.biz.modules.tenant.TenantConfiguration;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;












/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2024/2/23 16:30
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ImportAutoConfiguration({
        // 其他
        SystemProps.class,
        SsoClientProps.class,
        SsoServerProps.class,
        SystemSwaggerConfigurer.class,
        UserStatusTranslateHandler.class,
        AccountBindTypeTranslateHandler.class,
        UserTypeTranslateHandler.class,
        ClientTypeTranslateHandler.class,
        // service
        ServerEndpointExporter.class,
        SseServiceImpl.class,
        WebSocketServiceImpl.class,
        NoticeRecipientServiceImpl.class,
        NoticeServiceImpl.class,
        MenuPermitRelService.class,
        PostRoleRelService.class,
        RoleMenuRelService.class,
        UserPostRelService.class,
        UserRoleRelService.class,
        AccountBindServiceImpl.class,
        DataRuleItemServiceImpl.class,
        DataRuleServiceImpl.class,
        DataRuleProvideServiceImpl.class,
        DataScopeServiceImpl.class,
        DataSourceServiceImpl.class,
        MenuServiceImpl.class,
        OrgServiceImpl.class,
        PermitServiceImpl.class,
        ComponentServiceImpl.class,
        PostServiceImpl.class,
        PostTagServiceImpl.class,
        PostTagRelService.class,
        RefreshTokenServiceImpl.class,
        ResourceServiceImpl.class,
        RoleServiceImpl.class,
        RoleSelectorService.class,
        SsoApplyServiceImpl.class,
        TemporaryPasswordServiceImpl.class,
        TokenCurrBindServiceImpl.class,
        UserCurrBindServiceImpl.class,
        UserServiceImpl.class,
        AccountServiceImpl.class,
        CodeLoginServiceImpl.class,
        LoginServiceImpl.class,
        SsoClientServiceImpl.class,
        SsoServerServiceImpl.class,
        LogConfigServiceImpl.class,
        OperationLogServiceImpl.class,
        DictItemServiceImpl.class,
        DictServiceImpl.class,
        PublicServiceImpl.class,
        SysConfigServiceImpl.class,
        UserTagServiceImpl.class,
        UserTagItemService.class,
        OrgSelectorService.class,
        PostSelectorService.class,
        UserSelectorService.class,
        BizFileServiceImpl.class,
        BizFileTypeServiceImpl.class,
        FileMetadataServiceImpl.class,
        FileStorageServiceImpl.class,
        FileUploadInfoServiceImpl.class,
        FileAccessService.class,
        FileService.class,
        FileTemplateManager.class,
        TemplateServiceImpl.class,
        TemplateGroupServiceImpl.class,
        UrlMappingServiceImpl.class,
        SerialNumberServiceImpl.class,

        // controller
        SseController.class,
        WebSocket.class,
        NoticeController.class,
        AccountBindController.class,
        DataRuleController.class,
        DataScopeController.class,
        DataSourceController.class,
        MenuController.class,
        OrgController.class,
        PermitController.class,
        ComponentController.class,
        PostController.class,
        PostTagController.class,
        ResourceController.class,
        RoleController.class,
        RoleSelectorController.class,
        SsoApplyController.class,
        TemporaryPasswordController.class,
        TokenInfoController.class,
        UserController.class,
        AccountController.class,
        CodeLoginController.class,
        LoginController.class,
        SsoClientController.class,
        SsoServerController.class,
        LogConfigController.class,
        OperationLogController.class,
        ServerController.class,
        WebLogController.class,
        DictController.class,
        DictItemController.class,
        PublicController.class,
        SysConfigController.class,
        DataRuleItemController.class,
        DataRuleProvideController.class,
        UserTagController.class,
        OrgSelectorController.class,
        PostSelectorController.class,
        UserSelectorController.class,
        TemplateController.class,
        TemplateGroupController.class,
        UrlMappingController.class,
        BizFileController.class,
        FileStorageController.class,
        FileController.class,
        LocalFileController.class,
        LoggerController.class,
        // client
        MenuApiClient.class,
        OrgApiClient.class,
        PermitApiClient.class,
        PostApiClient.class,
        LoginApiClient.class,
        RoleApiClient.class,
        TokenCurrBindApiClient.class,
        UserApiClient.class,
        UserCurrBindApiClient.class,
        LogConfigApiClient.class,
        OperationLogApiClient.class,
        CaptchaApiClient.class,
        SysConfigApiClient.class,
        DictApiClient.class,
        RsaApiClient.class,
        Sm2ApiClient.class,
        SysConfigApiClient.class,
        DataPermissionApiClient.class,
        FileApiClient.class,
        // 多租户配置
        TenantConfiguration.class,
})
public class AutoConfiguration {

    static {
        // 数据权限忽略
        DataScopeHolder.addIgnore(AccountBindMapper.class);
        DataScopeHolder.addIgnore(DataRuleItemMapper.class);
        DataScopeHolder.addIgnore(DataRuleMapper.class);
        DataScopeHolder.addIgnore(DataRuleProvideMapper.class);
        DataScopeHolder.addIgnore(DataScopeMapper.class);
        DataScopeHolder.addIgnore(DataSourceMapper.class);
        DataScopeHolder.addIgnore(ResourceMapper.class);
        DataScopeHolder.addIgnore(TemporaryPasswordMapper.class);
        DataScopeHolder.addIgnore(TokenCurrBindMapper.class);
        DataScopeHolder.addIgnore(UserCurrBindMapper.class);
    }

}

